	#e[Stage]
	#Title[_uX|C[ver1.00]
	#Text[_uX|C[ver1.00]
	#Player[.\player\player\AYA.txt,.\player\player\HATATE.txt]
	#BackGround[User]
	#BackGround[Defalt]
	#ScriptVersion[2]

	script_stage_main
	{
	#include_function ".\txt\DifineMenuVariable.txt"//j[ʊǗp̒l̎[
	#include_function ".\txt/stagedata.txt"
	let StagesnapFile=[];
	if(SelectedCharacter==DefinedPlayer1)
	{
	ascent(let i in 0..20)
	{
		StagesnapFile=StagesnapFile~["DSAya"~NumToStringNoComplete(i)];
	}
	}
	if(SelectedCharacter==DefinedPlayer2)
	{
	ascent(let i in 0..20)
	{
		StagesnapFile=StagesnapFile~["DSHatate"~NumToStringNoComplete(i)];
	}
	}	
	let imgBG=csd ~ "img/MenuBG.png";
	let imgMenuLetter=csd ~ "img/MenuLetter.bmp";
	let imgDifficult=csd ~ "img/letter.png";
	let imgMenuEffect=csd ~ "img/effect_tiny.png";
	let imgSpellName=GetCurrentScriptDirectory ~ "img/SpellName.jpg";
	let imgChargeItem=csd ~ "player/img/border.png";

	let imgBestShot=[];
	let imgBestShotDetail=[];
	let snapFile=[];
	ascent(let i in 0..100)
	{
		snapFile=snapFile~[NumToStringNoComplete(i)];
	}
	ascent(let i in 0..100)
	{
		if(SelectedCharacter==DefinedPlayer1)
		{
			imgBestShot=imgBestShot~[csd ~ "AYABestShot/"~snapFile[i]~".bmp"];
			imgBestShotDetail=imgBestShotDetail~[csd ~ "AYABestShot/"~snapFile[i]~"Detail.bmp"];
		}
		if(SelectedCharacter==DefinedPlayer2)
		{
			imgBestShot=imgBestShot~[csd ~ "HATATEBestShot/"~snapFile[i]~".bmp"];
			imgBestShotDetail=imgBestShotDetail~[csd ~ "HATATEBestShot/"~snapFile[i]~"Detail.bmp"];
		}	
	}

	#include_function ".\settingtxt/SpellCardFile.txt"

	let MenuSE=[csd ~ "se/clock03.wav",csd ~ "se/cursor01.wav"];
	let TitleBGM=[csd ~ "bgm/title.wav"];
	let SelectedDifficult="Difficult";//Xỹj[̐pBO͂B

	let ScoreNumber1=0;
	let ScoreNumber2=0;

	let PhotoDrawing=true;//ʐ^\̗L̐؂ւpϐ
	let DetailDrawing=true;//XRAڍו\̗L̐؂ւpϐ

		task StageTask
		{
			yield;
			//MenuBackDraw;
			ShootFlagTask;
			MenuEffect;
			DefeatEffect;
			PhotoShooting;
		//	UpTimeCount;//NԌv
			PlayTimeCount;//vCԌv
			CheckItem;
			StageTitleDisplay;

			ForbidShot(false);
			ForbidBomb(false);

		}
	
		
		@Initialize()
		{
		//	SetCommonData("ReplayMode",true);
			CreateCommonDataArea(NsScore);
			LoadGraphic(imgBG);
			LoadGraphic(imgMenuEffect);
			LoadGraphic(imgLetter);
			LoadGraphic(imgChargeItem);
			LoadGraphic(imgMenuLetter);
			let isRep = IsReplay();
			if(isRep==false)
			{
				LoadCommonDataEx(NsScore,savePathstage);
			}
			else
			{
				LoadCommonDataFromReplayFile;
				StageState=Loading;
			}
			SetCommonData(NsIsReplay,isRep);
			SetCommonData(NsIsReplayJudgment,isRep);
			SetCommonData("ItemXY",[]);//ACeʒuWۑpʃf[^쐬
			StageTask();
		}
	
		@MainLoop()
		{
			yield;
			if(OnPlayerMissed)
			{
				SetCommonData("Playermissed",true);
			}
			else
			{
				SetCommonData("Playermissed",false);
			}

		}
		

		@DrawTopObject
		{
			SetTexture(imgBG);
			SetGraphicScale(1.0,1.0);
			SetGraphicRect(0,0,384,448);
			if(StageState==Menu || StageState==Loading || StageState==Exit)
			{
				SetGraphicAngle(0, 0, 0);
				SetViewTo(0,0,0);
				DrawGraphic(GetCenterX, GetCenterY);
			}
			//DrawText(NumToString(GetCommonDataDefaultEx(NsScore,NsUpTime,0)/60),320,432,12,255);//NԂ̕\
			//DrawText(NumToStringNoComplete(GetCommonDataDefaultEx(NsScore,NsPlayTime,0)/60),320,452,12,255);//vCԂ̕\
			//DrawText(NumToStringNoComplete(GetCommonDataDefaultEx(NsScore,NsPlayTime,0)/6),320,432,12,255);//vCԂ̕\
			//DrawText(ToString(100),320,452,12,255);//vCԂ̕\
			//DrawText(StageState,120,432,12,255);//NԂ̕\
		//	DrawText(SpellSelect,120,452,12,255);//vCԂ̕\
		//	DrawText(SpellLevel,120,412,12,255);//NԂ̕\
			MenuDraw;
		}

		@Finalize()
		{
			if(GetCommonDataDefault(NsIsReplay,true) == false)
			{
				SaveCommonDataEx(NsScore,savePathstage);
			}
			ClearCommonDataEx(NsScore);
			DeleteCommonData(NsGetSpell);
			DeleteCommonData(NsDefeatFrame);
			DeleteCommonData(NsDefeatPosX);
			DeleteCommonData(NsDefeatPosY);
			DeleteCommonData(NsBossFrame);
			DeleteCommonData(NsIsReplay);
		}
		@BackGround {

			}

///////////////////////////////////////////////////////////////////////////////////////
////////////////////////////Xe[WGtFNgAc@////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////

task LoadindPhotoImage
{//j[\̂߂̉摜[h
	while(MenuState!=Menu){yield;}
	#include_function ".\settingtxt/SetSpellName.txt"
	LoadGraphic(imgSpellName);
	ascent(let i in 1..100)
	{
	LoadGraphic(imgBestShot[i]);
	LoadGraphic(imgBestShotDetail[i]);
	}
	BestPhotoDraw;
	DetailDraw;
}
//////////////////////////////////////////////////////////////////////////////////////////////
///////////Xe[WAgCł̐//////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
let PhotoReload=true;
sub StageTitleDisplay//j[ʂ̕\ASecretSpellłĂяočċNĂB
{
if(PhotoReload==true && GetCommonData(NsIsReplayJudgment) == false && GetCommonDataDefaultEx(NsScore,"SpellNo",1) == 0)
{
	LoadindPhotoImage;//SẴxXgVbg摜[h
}

if(GetCommonDataDefaultEx(NsScore,"MenuSpellNo",0)!=0)
{
	SpellSelect=GetCommonDataDefaultEx(NsScore,"MenuSpellNo",0);//savedata烁j[pSelectǂݍ
	SpellLevel=GetCommonDataDefaultEx(NsScore,"MenuSpellLevelNo",0);//savedata烁j[pLevelǂݍ
}
if(GetCommonDataDefaultEx(NsScore,"SpellNo",0)==0 && GetCommonData(NsIsReplayJudgment) == false)
{
if(MenuState==Menu)
{
PlayMusic(TitleBGM[0]);
}
SetCommonData("DoubleSpoilerStageMenu",true);
	loop
	{
		alternative(StageState)	
		case(Menu)
		{
			TASK_MENU;
		}
		case(Exit)
		{
			StageState=Loading;
			SetCommonDataEx(NsScore,"SpellNo",SpellSelect);
			SetCommonDataEx(NsScore,"SpellLevelNo",SpellLevel);
			SetCommonDataEx(NsScore,"MenuSpellNo",0);
			SetCommonDataEx(NsScore,"MenuSpellLevelNo",0);
			SaveCommonDataEx(NsScore,savePath);//Select&Levelۑ
			wait(5);
SetCommonData("DoubleSpoilerStageMenu",false);
			Retry;
			break;
		 }
		others{}
	yield;
	}
}

else
{

StageState=Start;
if(GetCommonData(NsIsReplayJudgment) == false)
{
	SpellSelect=GetCommonDataDefaultEx(NsScore,"SpellNo",1);
	SpellLevel=GetCommonDataDefaultEx(NsScore,"SpellLevelNo",1);
	SetCommonDataEx(NsScore,"SpellNo",SpellSelect);
	SetCommonData("SpellNo",SpellSelect);
	SetCommonDataEx(NsScore,"SpellLevelNo",SpellLevel);
	SetCommonData("SpellLevelNo",SpellLevel);
	SaveCommonDataInReplayFile;
	SetCommonDataEx(NsScore,"SpellNo",0);
	SetCommonDataEx(NsScore,"SpellLevelNo",0);
}

else
{
	SpellSelect=GetCommonDataDefault("SpellNo",2);
	SpellLevel=GetCommonDataDefault("SpellLevelNo",2);
	SetCommonData(NsIsReplayJudgment,false);
}
}

DisPlayScore(SpellSelect);//XRA\

	ForbidShot(false);
	PlayMusic(SceneBGM[SpellSelect+SpellLevel*10]);
	CreateEnemyFromFile(SpellCardScScript[SpellSelect+SpellLevel*10],GetCenterX,GetClipMinY,2,0,0);
	wait(5);
	while(GetCommonDataDefault("BossExist",false)==true || StageState==Menu)
	{
		yield;
	}

if(GetCommonDataDefault("LoseBoss",false)==true)
{
	//wait(15);
}
else
{
	loop(10)
	{
		DeleteEnemyShotImmediatelyInCircle(ALL,GetCenterX,GetCenterY,350);
		yield;
	}
	wait(20);
}
	EndSpellMenu;
}

task EndSpellMenu
{
	Select=3000;
	StageState=Menu;
	MenuState=MenuDifficult;
	SetCommonData("ShootingEnd",true);
	endbunka;
	PhotoReload=false;
	StageTitleDisplay;
}

task endbunka
{
	while(MenuState==MenuDifficult){yield;}
	SetCommonData("PhotoEraze",true);
	StageState=Loading;
	SetCommonDataEx(NsScore,"MenuSpellNo",SpellSelect);
	SetCommonDataEx(NsScore,"MenuSpellLevelNo",SpellLevel);
	SaveCommonDataEx(NsScore,savePath);
	yield;
	Retry;
}
////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////ACe////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
task CheckItem
{
let ItemCheck=0;//ʃf[^̔z̒`FbNϐ
let XY=[];//ʃf[^̏ɃNbVu߂̕ϐ
let ItemPerFrame=1000;//Pt[̍őACei΍j
let judg=0;
loop
{		
/*	if(GetCommonDataDefault("LIGHTMODE",false)==true)
	{
		return;
	}
*/	ItemCheck=length(GetCommonDataDefault("ItemXY",[]));//t[ʃf[^̒`FbN
	if(ItemCheck>0)
	{//zɒgiACetOĂjꍇ̏
		loop(ItemPerFrame)
		{
			XY=GetCommonDataDefault("ItemXY",[]);//ʃf[^eϐɓn
			if(judg%2==0)
			{
			ChargeItem(XY[0],XY[1],XY[2]);
			}
			if(GetCommonDataDefault("LIGHTMODE",false)==false)
			{
			DeleteShotEffect(XY[0],XY[1],XY[2],0);//ACeBԂXWAYWAACe̎
			}
			judg+=1;
			loop(3)
			{
				XY=erase(XY, 0);
			}//̂ł̗vfz񂩂폜
			if(length(XY)==0)
			{//폜̔z񂪋ɂȂꍇ
				SetCommonData("ItemXY",[]);//ʃf[^ɂ
				break;//ACe[vEo
		
			}
			else
			{
				SetCommonData("ItemXY",XY);
			}//z񂪋łȂꍇʃf[^ɕύX̔zn
		}
	}
yield;
}
}


task DeleteShotEffect(X,Y,color,num)//gt̐ݒ
{
		while(GetCommonDataDefault("Shooting",false)){yield;}
	if(GetCommonDataDefault("DefeatBoss",false)==true && num==0)
	{
		DeleteShotEffect(X,Y,color,1);
	}
		let R;let G;let B;
		if(color==0){R=255;G=0;B=0;}
		if(color==1){R=255;G=165;B=0;}
		if(color==2){R=255;G=255;B=0;}
		if(color==3){R=0;G=255;B=0;}
		if(color==4){R=0;G=255;B=255;}
		if(color==5){R=0;G=0;B=255;}
		if(color==6){R=160;G=32;B=240;}
		if(color==7){R=255;G=255;B=255;}
		let Angle=rand(0,360);
		let Speed=rand(0.2,0.4);
		let RotateAngle=rand(2,10);
		let Zangle=rand(0,360);
		let dir=rand_int(0,1)*2-1;
		let Scale=0.45;
		let Alpha=150;

		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, imgMenuEffect);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -15, -15);
		ObjEffect_SetVertexXY(obj, 1, 15,  -15);
		ObjEffect_SetVertexXY(obj, 2, 15, 15);
		ObjEffect_SetVertexXY(obj, 3,  -15,  15);
		
		ObjEffect_SetVertexUV(obj, 0,  2,  24);
		ObjEffect_SetVertexUV(obj, 1,  32, 24);
		ObjEffect_SetVertexUV(obj, 2, 32,  55);
		ObjEffect_SetVertexUV(obj, 3, 2, 55);
		ObjEffect_SetLayer(obj,4);
		ObjEffect_SetScale(obj, Scale,Scale);
		
		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		Obj_SetPosition(obj,X,Y);
		Obj_SetAngle(obj,Angle);
		Obj_SetSpeed(obj,Speed);

		loop(30)
		{
			ObjEffect_SetAngle(obj,0,0,Zangle);
			ObjEffect_SetScale(obj, Scale,Scale);
			Zangle+=RotateAngle*dir;
			Scale-=0.015;
			yield;
		}
		Obj_Delete(obj);
}

task ChargeItem(X,Y,color)
{
		if(GetCommonDataDefault("DeleteBulletSignal",false)==true || GetCommonDataDefault("DefeatBoss",false)==true)
		{
			wait(30);
			SetCommonData("DeleteBulletSignal",false);
			return;
		}
		while(GetCommonDataDefault("Shooting",false)){yield;}
		let R;let G;let B;
		if(color==0){R=255;G=0;B=0;}
		if(color==1){R=255;G=165;B=0;}
		if(color==2){R=255;G=255;B=0;}
		if(color==3){R=0;G=255;B=0;}
		if(color==4){R=0;G=255;B=255;}
		if(color==5){R=0;G=0;B=255;}
		if(color==6){R=160;G=32;B=240;}
		if(color==7){R=255;G=255;B=255;}
		let obj=Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, imgChargeItem);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -4, -4);
		ObjEffect_SetVertexXY(obj, 1, 4,  -4);
		ObjEffect_SetVertexXY(obj, 2, 4, 4);
		ObjEffect_SetVertexXY(obj, 3,  -4,  4);
		
		ObjEffect_SetVertexUV(obj, 0,  173,  119);
		ObjEffect_SetVertexUV(obj, 1,  180, 119);
		ObjEffect_SetVertexUV(obj, 2, 180,  126);
		ObjEffect_SetVertexUV(obj, 3, 173, 126);
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,205,R,G,B);
			}	

		ObjEffect_SetLayer(obj,3);
		Obj_SetPosition(obj,X,Y);
		let StandardSpeed=rand(2,6);
		let speed=StandardSpeed;
		let angle=rand(0,360);

		let lightangle=rand(0,360);
		let Scale=2;
		ObjEffect_SetScale(obj,Scale,Scale);

		loop(20)
		{
		if(GetCommonDataDefault("DefeatBoss",false)==true)
		{
			Obj_Delete(obj);
			return;
		}
			lightangle+=12;
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,55+25*cos(lightangle),R,G,B);
			}
			Obj_SetPosition(obj,Obj_GetX(obj)+speed*cos(angle),Obj_GetY(obj)+speed*sin(angle));
			speed-=StandardSpeed/20;
			Scale-=0.015;
			ObjEffect_SetScale(obj,Scale,Scale);
			wait(1);
		}
		let aspeed=0;
		while(!Obj_BeDeleted(obj))
		{
			Scale-=0.01;
			ObjEffect_SetScale(obj,Scale,Scale);
			if(speed<10)
			{
			speed+=0.25;
			}
			if(GetCommonDataDefault("Playermissed",false)==true){speed=0;wait(30);Obj_Delete(obj);}
			lightangle+=12;
			ascent(let i in 0..4)
			{
				ObjEffect_SetVertexColor(obj,i,55+25*cos(lightangle),R,G,B);
			}
			let sangle=atan2(GetPlayerY-Obj_GetY(obj),GetPlayerX-Obj_GetX(obj));
			Obj_SetPosition(obj,Obj_GetX(obj)+speed*cos(sangle),Obj_GetY(obj)+speed*sin(sangle));
			if(((Obj_GetX(obj)-GetPlayerX)^2+(Obj_GetY(obj)-GetPlayerY)^2)^0.5<10)
			{
				let XY=GetCommonDataDefault("CHARGE",[]);//ʃf[^eϐɓn
				XY=XY~[1];//
				SetCommonData("CHARGE",XY);//ʃf[^ɕύX̔zn
				PlaySE("seScore.wav");
				Obj_Delete(obj);
			}
		yield;
		}

}

////////////////////////////////////////////////////////////////////////////////////////////
//////////////////ԌvA񐔋L^/////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
		task UpTimeCount//NԂ̌v
		{
			let UpTime=GetCommonDataDefaultEx(NsScore,NsUpTime,0);
			loop
			{
				UpTime++;
				SetCommonDataEx(NsScore,NsUpTime,UpTime);
				yield;
			}
		}

		task PlayTimeCount//vCԂ̌v
		{
			let PlayTime=GetCommonDataDefaultEx(NsScore,NsPlayTime,0);
			loop
			{
				if(StageState!=Menu)
				{
				PlayTime++;
				}
				SetCommonDataEx(NsScore,NsPlayTime,PlayTime);
				yield;
			}
		}
/////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////XRA\Aʐ^̋L^//////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////
task DisPlayScore(let SpellNo)//nCXRAĂяoAnCXRAƌXRA\
{
let EachHiScore=0;

while(GetCommonDataDefault("BossExist",false)==false){yield;}
if(SelectedCharacter==DefinedPlayer1)
{
	CreateScore(GetCommonDataDefaultEx(NsScore,Player1Hiscore[SpellNo+SpellLevel*10],0),SpellNo+SpellLevel*10);
}
if(SelectedCharacter==DefinedPlayer2)
{
	CreateScore(GetCommonDataDefaultEx(NsScore,Player2Hiscore[SpellNo+SpellLevel*10],0),SpellNo+SpellLevel*10);
}
}

function CreateScore(let EachHiScore,SpellNo)//
{
loop
{
	ScoreNumber1+=GetScore;
	AddScore(-GetScore);

	DisPlayScoreNumber(GetClipMinX+80,GetClipMinY+20,EachHiScore,ScoreNumber2);//nCXRA
	DisPlayScoreNumber(GetClipMaxX-10,GetClipMinY+20,ScoreNumber1,ScoreNumber2);//XRA

	SetCommonData("PlayerHiPhoto",GetCommonDataEx(NsScore,Player2HiPhoto[SpellNo]));

	if(GetCommonDataDefault("BossExist",false)==false)
	{
		break;
	}
yield;
}

	if(SelectedCharacter==DefinedPlayer1)
	{
	let Number=GetCommonDataDefaultEx(NsScore,Player1AllPhoto[SpellNo],0);
	SetCommonDataEx(NsScore,Player1Challenge[SpellNo],GetCommonDataDefaultEx(NsScore,Player1Challenge[SpellNo],0)+1);//񐔂𑝂₷
	SetCommonDataEx(NsScore,Player1AllPhoto[SpellNo],Number+GetCommonDataDefault("AllPhoto",0));//OԂɖ𑝂₵ĕۑ
		if(GetCommonDataDefaultEx(NsScore,Player1Hiscore[SpellNo],0)==0)
		{
			SetCommonDataEx(NsScore,Player1FirstClearChallenge[SpellNo],GetCommonDataDefaultEx(NsScore,Player1FirstClearChallenge[SpellNo],0)+1);//񐔂𑝂₷
			SetCommonDataEx(NsScore,Player1FirstClearPhoto[SpellNo],GetCommonDataDefaultEx(NsScore,Player1FirstClearPhoto[SpellNo],0)+GetCommonDataDefault("AllPhoto",0));
		}
	}
	if(SelectedCharacter==DefinedPlayer2)
	{
	let Number=GetCommonDataDefaultEx(NsScore,Player2AllPhoto[SpellNo],0);
	SetCommonDataEx(NsScore,Player2Challenge[SpellNo],GetCommonDataDefaultEx(NsScore,Player2Challenge[SpellNo],0)+1);//񐔂𑝂₷
	SetCommonDataEx(NsScore,Player2AllPhoto[SpellNo],Number+GetCommonDataDefault("AllPhoto",0));//OԂɖ𑝂₵ĕۑ
		if(GetCommonDataDefaultEx(NsScore,Player2Hiscore[SpellNo],0)==0)
		{
			SetCommonDataEx(NsScore,Player2FirstClearChallenge[SpellNo],GetCommonDataDefaultEx(NsScore,Player2FirstClearChallenge[SpellNo],0)+1);//񐔂𑝂₷
			SetCommonDataEx(NsScore,Player2FirstClearPhoto[SpellNo],GetCommonDataDefaultEx(NsScore,Player2FirstClearPhoto[SpellNo],0)+GetCommonDataDefault("AllPhoto",0));
		}
	}

if(EachHiScore<=ScoreNumber1 && GetCommonDataDefault("DefeatBoss",false)==true)
{
	if(SelectedCharacter==DefinedPlayer1)
	{
	SetCommonDataEx(NsScore,Player1Hiscore[SpellNo],ScoreNumber1);//OԂɃnCXRAۑ
	}
	if(SelectedCharacter==DefinedPlayer2)
	{
	SetCommonDataEx(NsScore,Player2Hiscore[SpellNo],ScoreNumber1);//OԂɃnCXRAۑ
	}
}

if(GetCommonDataDefaultEx(NsScore,Player1HiPhoto[SpellNo],0)<=GetCommonDataDefault("HiBasePoint",0))
{
	if(SelectedCharacter==DefinedPlayer1)
	{
	SetCommonDataEx(NsScore,Player1HiPhoto[SpellNo],GetCommonDataDefault("HiBasePoint",0));//OԂɃxXgVbgۑAő_͎@ŔfĂ
	}
}
if(GetCommonDataDefaultEx(NsScore,Player2HiPhoto[SpellNo],0)<=GetCommonDataDefault("HiBasePoint",0))
{
	if(SelectedCharacter==DefinedPlayer2)
	{
	SetCommonDataEx(NsScore,Player2HiPhoto[SpellNo],GetCommonDataDefault("HiBasePoint",0));//OԂɃxXgVbgۑAő_͎@ŔfĂ
	}
}

	AddScore(ScoreNumber1);
	AddScore(SpellLevel*100000000+SpellSelect*10000000);

SavePhoto(SpellNo);

loop
{

	DisPlayScoreNumber(GetClipMinX+80,GetClipMinY+20,EachHiScore,ScoreNumber2);
	DisPlayScoreNumber(GetClipMaxX-10,GetClipMinY+20,ScoreNumber1,ScoreNumber2);
	if(GetCommonDataDefault("PhotoEraze",false)==true)
	{
		break;
	}
yield;
}
}

task SavePhoto(SpellNo)
{
loop
{
	if(GetCommonDataDefault("PhotoSaveReady",false)==true && GetCommonDataDefault(NsIsReplay,true) == false)
	{//ʐ^I\
		if(GetKeyState(VK_SKIP)==KEY_PUSH)
		{
			SetCommonData("DetailShooting",true);
			wait(1);
			SaveSnapShot(imgBestShotDetail[SpellNo],0,0,448,480);
			SetCommonData("DetailShooting",false);
			SetCommonData("SnapShooting",true);
			wait(1);
			SaveSnapShot(imgBestShot[SpellNo],0,0,448,480);
			wait(1);
			SetCommonData("SnapShooting",false);
			DrawKirokusimasita;
			wait(35);
		}
	}
yield;
}
}
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////CN[h////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
#include_function ".\settingtxt/LevelNorma.txt"
#include_function ".\settingtxt/ScoreNorma.txt"
#include_function ".\settingtxt/Topic.txt"
#include_function ".\settingtxt/BGM.txt"
#include_function ".\txt/MENU.txt"
#include_function ".\txt/MENUDRAW.txt"
#include_function ".\txt/DrawMenuLetterData.txt"
#include_function ".\txt/MenuEffectData.txt"
#include_function ".\txt/stagedataforphoto.txt"
}